1. Field of Disclosure
The disclosure generally relates to the field of data storage, in particular to file systems used in data storage devices.
2. Description of the Related Art
As the capacity of mobile storage devices (e.g., mobile computing devices, portable media players) increase, users are increasingly putting large amounts of data on these devices. Most of these devices use a version of File Allocation Table (FAT) file system to manage their data storage, such as FAT12, FAT16, and FAT32. A predominant reason of the popularity of FAT file systems among mobile storage devices is because they are compatible (or supported) and interoperable with computers running popular operating systems such as Microsoft Windows™, Mac OS™, and Linux™.
Users of the mobile storage devices frequently access and modify data stored in the devices through connected computers. For example, a user may transfer pictures from a desktop computer to a mobile computer device (e.g., a smart phone) and store the pictures in the device. When accessing a mobile storage device, the connected computer often takes over access control of the device and operates directly in the storage medium within the device. These direct operations often modify data on the mobile storage device (e.g., create a file, delete a directory). As a result, it is necessary for the mobile storage device to detect the modified files and directories and notify local applications utilizing the modified files such that they can update their indexes. For example, a media player application on a mobile computing device must index newly added media files on the device to keep its media library (or database) up-to-date.
FAT file systems are inefficient in detecting modified files and directories because of their poor timestamp semantics. In a FAT file system, files and subdirectories within a directory are represented by FAT entries (also called entries) in a directory table for the directory. An entry in a directory table includes information such as date and time of creation and time of last modification and address of the first sector allocated for the represented file or subdirectory.
A FAT entry for a directory does not maintain modification information for files and subdirectories in the directory (or in its direct or indirect subdirectories). Therefore, once the FAT file system loses high level access control to its storage medium, an application would need to recursively enumerate the entire FAT structure of the storage medium (e.g., visit every directory table in the file system) to detect modifications made during the time it does not have access control. As storage continues growing, this enumeration process can become time consuming.
For example, a mobile drive using a FAT file system containing 10,000 files is mounted on a computer and relinquishes high level access control to the computer. The computer modified a single file on the mobile drive. When the mobile drive is subsequently unmounted and regains access control, an application that wants to process modified files must enumerate the entire FAT structure, including entries for all 10,000 files, to locate the single modified file. This enumeration process is inefficient and can cause performance (or user experience) to suffer.
Thus, the art lacks a system and method for efficiently detecting modifications in a data storage device using a FAT file system.